package org.agridata.akvisualization.controller.appoint;



import org.agridata.akvisualization.doMain.appoint.dto.CcAaAndAbDto;
import org.agridata.akvisualization.result.Result;
import org.agridata.akvisualization.service.appoint.CcAaAndAbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/tccaab")
public class CcAaAndAbController {

    @Autowired
    private CcAaAndAbService service;

    @PostMapping("/earTags")
    public Result earTags(@RequestBody CcAaAndAbDto ccAaAndAbDto){
        try {
            return service.earTagsSelect(ccAaAndAbDto);
        } catch (Exception e) {
            e.printStackTrace();
            return Result.fail("出现异常");
        }
    }
    @PostMapping("/belong")
    public Result belong (@RequestBody CcAaAndAbDto ccAaAndAbDto){
        try {
            return service.belongVerify(ccAaAndAbDto);
        } catch (Exception e) {
            e.printStackTrace();
            return Result.fail("出现异常");
        }
    }

}
